package com.spring.component.job.model;

import java.util.Date;
import java.util.Map;

/**
 * @author liushihua
 * @since 2018年04月28日
 */
public class BusinessJobConfig {
  /* 工作任务类的bean名 */
  private String serviceName;
  /* 方法名 */
  private String methodName;
  /* cron表达式 */
  private String cronExpression;
  /* 类别 */
  private String category;
  /* ip集合，用逗号隔开 */
  private String ips;
  /* job创建者 */
  private String creator;
  private String creatorId;
  private Date createDt;
  private String lastUpdator;
  private String lastUpdatorId;
  private Date lastUpdatorDt;
  /* 是否需要登录，比如需要调用其他应用的时候需要登录，runAsAdmin为true */
  private boolean runAsAdmin = false;
  private Map<String, Object> params;
  private String id;

  public String getServiceName() {
    return serviceName;
  }

  public void setServiceName(String serviceName) {
    this.serviceName = serviceName;
  }

  public String getMethodName() {
    return methodName;
  }

  public void setMethodName(String methodName) {
    this.methodName = methodName;
  }

  public String getCronExpression() {
    return cronExpression;
  }

  public void setCronExpression(String cronExpression) {
    this.cronExpression = cronExpression;
  }

  public String getCategory() {
    return category;
  }

  public void setCategory(String category) {
    this.category = category;
  }

  public String getIps() {
    return ips;
  }

  public void setIps(String ips) {
    this.ips = ips;
  }

  public String getCreator() {
    return creator;
  }

  public void setCreator(String creator) {
    this.creator = creator;
  }

  public String getCreatorId() {
    return creatorId;
  }

  public void setCreatorId(String creatorId) {
    this.creatorId = creatorId;
  }

  public Date getCreateDt() {
    return createDt;
  }

  public void setCreateDt(Date createDt) {
    this.createDt = createDt;
  }

  public String getLastUpdator() {
    return lastUpdator;
  }

  public void setLastUpdator(String lastUpdator) {
    this.lastUpdator = lastUpdator;
  }

  public String getLastUpdatorId() {
    return lastUpdatorId;
  }

  public void setLastUpdatorId(String lastUpdatorId) {
    this.lastUpdatorId = lastUpdatorId;
  }

  public Date getLastUpdatorDt() {
    return lastUpdatorDt;
  }

  public void setLastUpdatorDt(Date lastUpdatorDt) {
    this.lastUpdatorDt = lastUpdatorDt;
  }

  public boolean isRunAsAdmin() {
    return runAsAdmin;
  }

  public void setRunAsAdmin(boolean runAsAdmin) {
    this.runAsAdmin = runAsAdmin;
  }

  public Map<String, Object> getParams() {
    return params;
  }

  public void setParams(Map<String, Object> params) {
    this.params = params;
  }

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  @Override
  public String toString() {
    return "BusinessJobConfig{" + "serviceName='" + serviceName + '\'' + ", methodName='"
        + methodName + '\'' + ", cronExpression='" + cronExpression + '\'' + ", category='"
        + category + '\'' + ", ips='" + ips + '\'' + ", creator='" + creator + '\''
        + ", creatorId='" + creatorId + '\'' + ", createDt=" + createDt + ", lastUpdator='"
        + lastUpdator + '\'' + ", lastUpdatorId='" + lastUpdatorId + '\'' + ", lastUpdatorDt="
        + lastUpdatorDt + ", runAsAdmin=" + runAsAdmin + ", params=" + params + ", id='" + id + '\''
        + '}';
  }
}
